/**
 * Copyright (C) 2024-2030 Super BilGen & 超亿时代信息技术股份有限公司.All Rights Reserved.
 */
package cn.com.yang.minio.config;



import javax.validation.constraints.NotBlank;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Model cn.com.yang.minio.config.MinioProperties
 * @Desc  使用前缀
 * @author yangyijin
 * @since 2025年10月9日-下午8:11:57
 */
@Component
@ConfigurationProperties(prefix = "yang.minio")
public class MinioProperties {
    
    private String endpoint;
    
    @NotBlank
    private String accessKey;
    
    @NotBlank
    private String secretKey;
    
    @NotBlank
    private String bucketName;
    
    private boolean secure = false; // 默认不使用 HTTPS
    private int connectTimeout = 30; // 默认连接超时时间（秒）
    private int writeTimeout = 60; // 默认写入超时时间（秒）
    private int readTimeout = 60; // 默认读取超时时间（秒）
    
    public String getEndpoint() {
        return endpoint;
    }
    
    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }
    
    public String getAccessKey() {
        return accessKey;
    }
    
    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }
    
    public String getSecretKey() {
        return secretKey;
    }
    
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }
    
    public String getBucketName() {
        return bucketName;
    }
    
    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }
    
    public boolean isSecure() {
        return secure;
    }
    
    public void setSecure(boolean secure) {
        this.secure = secure;
    }
    
    public int getConnectTimeout() {
        return connectTimeout;
    }
    
    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }
    
    public int getWriteTimeout() {
        return writeTimeout;
    }
    
    public void setWriteTimeout(int writeTimeout) {
        this.writeTimeout = writeTimeout;
    }
    
    public int getReadTimeout() {
        return readTimeout;
    }
    
    public void setReadTimeout(int readTimeout) {
        this.readTimeout = readTimeout;
    }
}